import request from "@/utils/request";
export function  getDetail(id){
    return request({
        url: '/api/knowledge/detail',
        method: 'get',
        params: {id}
    })
}


export function  add(data){
    return request({
        url: '/api/knowledge/create',
        method: 'post',
        data: data
    })
}

export function  update(data){
    return request({
        url: '/api/knowledge/update',
        method: 'post',
        data: data
    })
}

/**
 * 删除标签
 * @param {number} tagId - 标签ID
 * @returns {Promise} API响应
 */
export function deleteTag(tagId) {
    return request({
        url: '/api/knowledge/deleteTag',
        method: 'DELETE',
        params: { tagId: tagId }
    })
}
